﻿using Super_Management_Mayhem.Content.Spritesheet;
using Transformable_Engine_v2.Engine.GameObjects.Containers;
using Transformable_Engine_v2.Engine.Global;
using Transformable_Engine_v2.Engine.Time;

namespace Super_Management_Mayhem.Screens.Playing.Tiles
{
    public class Button : Container
    {
        private ImageContainer _button;

        public override void LoadContent()
        {
            _button = new ImageContainer();
            Release();
            AddChildren(_button);

            base.LoadContent();
        }

        public void Press()
        {
            _button.Sprite = ItemSheet.GetSprite(ItemSheet.Tile.ButtonPressed);
            Log.LogInfo("Button pressed");
        }

        public void Release()
        {
            _button.Sprite = ItemSheet.GetSprite(ItemSheet.Tile.Button);
            Log.LogInfo("Button released");
        }
    }
}